var gulp = require('gulp');
gulpLoadPlugins = require('gulp-load-plugins'),//通过gulp-load-plugins加载插件
    plugins = gulpLoadPlugins();
gulp.task('default', function () {
    gulp.src('src/js/*.js')
        .pipe(plugins.uglify())
        .pipe(gulp.dest('build'))
});
gulp.task('minify', function () {
    gulp.src('src/js/*.js')
        .pipe(plugins.uglify())
        .pipe(plugins.rename({suffix: '.min'}))
        .pipe(gulp.dest('build'))
});
gulp.task('min', function () {
    return gulp.src(['src/js/*.js'])
        .pipe(plugins.uglify())
        .pipe(plugins.concat('jquery-common.min.js'))
        .pipe(gulp.dest('build'));
});